<div id="<?php echo sfConfig::get('app_windows_invoice_search_form_id')?>">
  <div class="form_title">Search Invoice</div>
  <?php echo form_tag('invoice/doSearch',array('id'=>'formInvoiceSearch',))?>
  <?php echo $myInvoiceSearchForm['_csrf_token'];?>
  <table>
    <tbody>
      <tr>
        <th class="field">
          Invoice/DR
        </th>
        <td class="field">
          <?php echo $myInvoiceSearchForm['invoice_type'];?>
          <?php echo $myInvoiceSearchForm['invoice_id_from'];?> to
          <?php echo $myInvoiceSearchForm['invoice_id_to'];?>
        </td>
      </tr>
      <tr>
        <th class="field">
          Date
        </th>
        <td class="field">
          <?php echo $myInvoiceSearchForm['issue_date_from'];?> to
          <?php echo $myInvoiceSearchForm['issue_date_to'];?>
        </td>
      </tr>
      <tr>
        <th class="field">
          <?php echo $myInvoiceSearchForm['customer_name']->renderLabel()?>
        </th>
        <td class="field" colspan="4">
          <?php echo $myInvoiceSearchForm['customer_name']?>
          <div id="invoiceShowVoidOnly">
          <?php echo $myInvoiceSearchForm['show_void_only']->renderLabel()?>
          <?php echo $myInvoiceSearchForm['show_void_only']?>
          </div>
        </td>
      </tr>
    </tbody>
  </table>
  <center>
     <input type="submit" value="Search"/> | 
     <input type="reset" value="Reset"/>
  </center>
  </form>
</div>

<div id="<?php echo sfConfig::get('app_windows_invoice_search_grid_id')?>">
</div>

<a href="#" id="<?php echo sfConfig::get('app_windows_invoice_show_grid_id')?>" style="display:none">Show Search Results</a>

<div id="<?php echo sfConfig::get('app_windows_invoice_panel_id')?>" style="display:none;">
</div>

<script language="javascript">
  $(document).ready(function(){
    invoiceSetupSearchForm();
    invoiceSetupShowSearchGrid();
    if(invoiceDialogMode>0)
        $('#invoiceShowVoidOnly').hide();
  });
</script>